package WWW.SST.LIB;

/** 
 Alipay ��ժҪ˵����
*/
public class Alipay
{

	public Alipay()
	{
		//
		// TODO: �ڴ˴���ӹ��캯���߼�
		//
	}

	public final String GetPaygateUrl(java.math.BigDecimal fee)
	{


		MOLE.Alipay.CommInfo o = new MOLE.Alipay.CommInfo();
		o.partner = MOLE.GetValue.GetConfigString("ZifubaoID");
		o.key = MOLE.GetValue.GetConfigString("key");
		o.return_ur = MOLE.GetValue.GetConfigString("UrlReturn");
		o.notify_url = MOLE.GetValue.GetConfigString("UrlNotify");
		o.trade_no = MOLE.comm.getRandom();
		o.subject = "ʱʱ�ʳ�ֵ";
		o.body = "ʱʱ�ʳ�ֵʹ��֧����֧��";
		o.quantity = "1";
		o.total_fee = fee.toString();
		o.seller_email = MOLE.GetValue.GetConfigString("email");
		o.show_url = "http://www.shishicai.cn";


		MOLE.Alipay.Alipay a = new MOLE.Alipay.Alipay(o);
		SaveUserInfo(o.trade_no);
		return a.CreatUrl();
	}


	/** 
	 
	 
	 @param oid
	*/
	public final void SaveUserInfo(String oid)
	{
		int uid = MOLE.GetValue.GetCookieInt("hy_num");
		 String s = " exec Account_AlipayChargeSaveInfo " + String.valueOf(uid) + "," + oid;
		//exec Order_Add  2004,861109,1,'cncard'
		MOLE.SQL.ExecuteSql(s);


	}
}